﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.TeamFoundation.TestManagement.Client;

namespace TFSTools.TFSLibrary.TestManagement
{
    public sealed class TFSSharedStepReference : TFSTestAction
    {
        private ISharedStepReference serverSharedStepReference;
        private ISharedStep serverSharedStep;

        internal TFSSharedStepReference(TFSTestCase testCase, ISharedStepReference sharedStepReference, decimal stepNumber)
            : base(testCase, sharedStepReference, stepNumber)
        {
            this.serverSharedStepReference = sharedStepReference;
            this.serverSharedStep = sharedStepReference.FindSharedStep();
        }

        internal ISharedStep SharedStep { get { return this.serverSharedStep; } }

        public override string Title
        {
            get
            {
                return this.serverSharedStep.Title;
            }
        }

        public override TFSTestActionType ActionType
        {
            get { return TFSTestActionType.SharedStepReference; }
        }
    }
}
